//2009/08/22 01:17:03
#include <iostream>
#include <string>
#include <vector>
#include <map>
#include <queue>
#include <sstream>
#include <algorithm>

using namespace std;

class Palindromize2
{
public:
    string minChanges(string s)
    {
		string s1;
		for(int i=0; i<s.size(); i++) s1 += s[s.size() -1 -i];
		for(int i=0; i<s.size(); i++)
			if(s[i] != s1[i])
				s1[i] = min(s[i], s1[i]);
		return s1;
    }
};
